<template lang="">
  <div class="circle-box _rel _wrapper-y">
    <div
      class="_flex _cart _flex-a-stretch _m-b-10"
      v-for="item in rows"
      :key="item.id"
      @click="
        $comStore.comWin.openWin(
          {
            name: '发布内容',
            code: 'ToolVditor',
            full: false,
          },
          {
            id: item.id,
          }
        )
      "
    >
      <img
        class="_img100 _border"
        src="https://i.imnks.com/2023/03/2425688192.png!1"
      />
      <div class="_flex-item-1">
        <div class="_flex-y _flex-a-start _m-l-5 _p5 _box _wrapper">
          <div class="_font _font-title">{{ item.title }}</div>
          <div class="_flex-item-1 _font">
            <div class="_line _line-2">{{ item.content }}</div>
          </div>
          <div class="_font _font">
            {{ $dayjs(item.created_date).format() }}
          </div>
        </div>
      </div>
    </div>
    <div class="_abs-btn-rb">
      <el-button
        type="primary"
        circle
        style="width: 30px; line-height: 30px"
        @click="
          $comStore.comWin.openWin(
            {
              name: '发布内容',
              code: 'ToolVditor',
              full: false,
            },
            {
              type: 2,
            }
          )
        "
        >+</el-button
      >
    </div>
  </div>
</template>
<script>
import ToolAction from "@/tool/http/tool-action.js";
const accountContentAction = ToolAction.init("account_content");
export default {
  data() {
    return {
      rows: [],
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {
      accountContentAction
        .list({
          rules: {
            type__in: "2",
          },
        })
        .then((res) => {
          this.rows = res;
          console.log(this.rows);
        });
    },
  },
};
</script>
<style scoped>
.circle-box {
  padding: 10px 10%;
}
</style>
